<%@ page language="java" import="java.util.*,com.ncp.model.biz.news.*,com.ncp.model.biz.product.*,com.ncp.model.entity.product.*,com.ncp.model.entity.news.*" pageEncoding="UTF-8"%>
<%
String path = request.getContextPath(); 
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/"; 
ArrayList al2=new ProductManager().getAllProduct();
int l2=al2.size();
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<base href="<%=basePath%>">
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>农产品</title>
	<link href="css/common.css" type="text/css" rel="stylesheet" />
	<link href="css/index.css" type="text/css" rel="stylesheet" />
    <script type="text/javascript">
	//function myReload(){
		//var myImg=document.getElementById("pictureCheckCode");
		//now=new Date();
		//myImg.src=myImg.src+"?pictureCheckCode="+now.getTime();
		document.getElementById("pictureCheckCode").src=document.getElementById("pictureCheckCode").src+"?nocache="+new Date().getTime();
	//}
		function changeImg(){
	       	 var url="pictureCheckCodeServlet";
	     	 url=convertURL(url);
	    	 document.getElementById("pictureCheckCode").src=url;
	      }
	  	function convertURL(url){
	     	var timetamp=(new Date()).valueOf();
			url=url+"?t="+timetamp;
	     	return url;
	 	 }
		
	function register(){
		 window.parent.location.href="pages/registerlogin/register.jsp";
	}
    function check(){
       var uname = document.getElementById("userLoginName").value;
	   var passWord = document.getElementById("passWord").value;
	   var inputCheckCode = document.getElementById("inputCheckCode").value;
	   if(uname==""||passWord==""||inputCheckCode==""){
	          if(uname==""){
		          alert("请输入用户名");
	 			form1.userLoginName.focus();
	 			return false;
	 			}else if(passWord==""){
	 				alert("请输入登录密码");
	 				form1.passWord.focus();
	 				return false;
	 			}else if(inputCheckCode==""){
	 				alert("请输入验证码");
		 			form1.inputCheckCode.focus();
		 			return false;
		 		}
		}
	   return true;
	}

    function modify(){
	    window.parent.location.href="pages/registerlogin/modifyregister.jsp";
	}
  </script>
</head>

<body>
<div id="allpage">
	<jsp:include flush="true" page="pages/index/head.jsp"></jsp:include>
	
	<div id="main">
		<div id="content" class="left">
			<!--最新资讯-->
			<jsp:include flush="true" page="pages/index/news.jsp"></jsp:include>
			<!--关于我们-->
			<jsp:include flush="true" page="pages/index/aboutUs.jsp"></jsp:include>
		</div>
	
		<div id="sidebar" class="right" style="width:241px;">
			<!--会员登录-->
			<div class="log_in">
				<div class="title_1">
				</div>
				<div class="content_1">
					 <jsp:include flush="true" page="/isLogin.jsp"></jsp:include>
				</div>
			</div>
			<!--联系我们-->
			<jsp:include flush="true" page="pages/index/contactUs.jsp"></jsp:include>
		</div>
		
		<div style="clear:both"></div>
		<jsp:include flush="true" page="pages/index/newProduct.jsp"></jsp:include>
		
	</div>
	
	<div id="slice">
	</div>
	<jsp:include flush="true" page="pages/index/foot.jsp"></jsp:include>
</div>

</body>
</html>

